use serde::{Deserialize, Serialize};
use sqlx::prelude::FromRow;
use utoipa::ToSchema;

#[derive(Debug, FromRow, Serialize, Clone, Deserialize, ToSchema)]
pub struct User {
    pub id: i64,
    pub username: String,
    pub email: String,
    pub password_hash: String,
}

/// 创建用户请求体结构体
#[derive(Debug, Serialize, Deserialize, ToSchema)]
pub struct UserSaveDTO {
    pub username: String,
    pub email: String,
    pub password: String,
}

#[derive(Debug, Serialize, Deserialize, ToSchema)]
pub struct UserSigninDTO {
    pub email: String,
    pub password: String,
}
